package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.supplierInfo;
import com.ymttest.database.model.godmch.supplierInfoExample;
import com.ymttest.database.model.godmch.supplierInfoKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface supplierInfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @SelectProvider(type=supplierInfoSqlProvider.class, method="countByExample")
    int countByExample(supplierInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @DeleteProvider(type=supplierInfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(supplierInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @Delete({
        "delete from supplierinfo",
        "where supplierId = #{supplierId,jdbcType=INTEGER}",
          "and mchId = #{mchId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(supplierInfoKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @Insert({
        "insert into supplierinfo (supplierId, mchId, ",
        "depot, remark, createTime, ",
        "updateTime)",
        "values (#{supplierId,jdbcType=INTEGER}, #{mchId,jdbcType=INTEGER}, ",
        "#{depot,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(supplierInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @InsertProvider(type=supplierInfoSqlProvider.class, method="insertSelective")
    int insertSelective(supplierInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @SelectProvider(type=supplierInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="supplierId", property="supplierId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="depot", property="depot", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<supplierInfo> selectByExample(supplierInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @Select({
        "select",
        "supplierId, mchId, depot, remark, createTime, updateTime",
        "from supplierinfo",
        "where supplierId = #{supplierId,jdbcType=INTEGER}",
          "and mchId = #{mchId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="supplierId", property="supplierId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="depot", property="depot", jdbcType=JdbcType.VARCHAR),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    supplierInfo selectByPrimaryKey(supplierInfoKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @UpdateProvider(type=supplierInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") supplierInfo record, @Param("example") supplierInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @UpdateProvider(type=supplierInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") supplierInfo record, @Param("example") supplierInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @UpdateProvider(type=supplierInfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(supplierInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table supplierinfo
     *
     * @mbggenerated Wed Mar 11 14:31:59 CST 2020
     */
    @Update({
        "update supplierinfo",
        "set depot = #{depot,jdbcType=VARCHAR},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where supplierId = #{supplierId,jdbcType=INTEGER}",
          "and mchId = #{mchId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(supplierInfo record);
}